<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
${aier_doctype}
<html <s:property value="aier_html_xmlns" escape="false"/>>
<head>
<meta http-equiv="Content-Type" content="${aier_content_type}" />
<meta name="keywords" content="${aier_keyworks}" />
<meta name="description" content="${aier_description}" />
<title>${aier_title}</title>
<link rel="stylesheet" href="${aier_css_url}${aier_jqui_css}ui.css" />
<link rel="Stylesheet" href="${aier_css_url}jq/jq.css" />
<link rel="Stylesheet" href="${aier_css_url}jq/multiselect.css" />
<link rel="stylesheet" href="${aier_css_url}jc/chosen.css">
<link rel="stylesheet" href="${aier_css_url}jp/msg.css" />
<link rel="stylesheet" href="${aier_css_url}social/module/reset.css" />
<link rel="stylesheet" href="${aier_css_url}social/module/btn.css" />
<link rel="stylesheet" href="${aier_css_url}social/user/ujscb.css" />
<link rel="stylesheet" href="${aier_css_url}social/module/uploadphoto.css" />
<link rel="stylesheet" href="${aier_css_url}social/module/xxs.css" />

<script type="text/javascript" src="${aier_js_url}j.js"></script>
<script type="text/javascript" src="${aier_js_url}b.js"></script>
<script type="text/javascript" src="${aier_js_url}${aier_jqui_js}ui.js"></script>
<script type="text/javascript" src="${aier_js_url}97/WdatePicker.js"></script>
<script type="text/javascript" src="${aier_js_url}jp/msg.js"></script>
<script type="text/javascript" src="${aier_js_url}jq/cn.js"></script>
<script type="text/javascript" src="${aier_js_url}jq/jq.js"></script>
<script type="text/javascript" src="${aier_js_url}lib/ja.js"></script>
<script type="text/javascript" src="${aier_js_url}jc/cj.js"></script>
<script type="text/javascript" src="${aier_js_url}lib/block.js"></script>
<script type="text/javascript" src="${aier_js_url}lib/afu.js"></script>
<script type="text/javascript" src="${aier_js_url}jq/multiselect.js"></script>
<script type="text/javascript" src="${aier_js_url}social/user/userHSConBook/chibook.js"></script>
</head>
<script type="text/javascript">
	var global_suffix = "${aier_suffix}", global_url = "${aier_url}", global_uri = "${aier_uri}", global_urijs = "${aier_urijs}", 
		global_cid = "${cid}", global_tid = "${tid}",global_buid = "${buid}",global_userin_url = "${video_user_in_url}",global_userout_url = "${video_user_out_url}";
</script>
<body data-usertype="全部" data-page="家校联系簿列表" class="view-ujscb-list">

	<!-- 顶栏 -->
	<s:action name="userhomecomm_homeHead" namespace="/user" executeResult="true"></s:action>
	<!-- 顶栏结束 -->

	<!-- 主区域 -->

	<div class="window-content">

		<!-- wrap  -->
		
		<div class="wrap clearfix">

			<!-- 主侧栏 -->
			<s:action name="userhomecomm_homeLeft" namespace="/user" executeResult="true"></s:action>


			<!-- 主区域 (右  -->
			<div class="main-area clearfix">
				<div class="list-ujscb">
					<div class="list-title">
						<span>家校联系簿</span>
					</div>
                    
					<div class="list-items" id = "booklist">

					</div>


				</div>

                <!-- 右栏 -->
                <s:action name="userhomecomm_homeRight" namespace="/user" executeResult="true"></s:action>
			</div>

			<!-- 回到顶部 -->
			<s:action name="userhomecomm_backToTop" namespace="/user" executeResult="true"></s:action>
			<!-- 回到顶部结束  -->

		</div>
		<!-- footer copyright -->
		<s:action name="userhomecomm_homeFooter" namespace="/user" executeResult="true"></s:action>
		<!-- /footer copyright -->
	</div>
	


<script type="text/javascript">


    
    $(document).ready(function() {
        var fun=function(data){
               if(data.s==1){
                    $("#booklist").children('.list-item').remove();
                    var ohtml = '<div class="list-item"><span class="book-type"></span><a href="" target="_blank"></a></div>';
			        if (data.schoolTeacher != null && data.schoolTeacher.length > 0) {
			            for (var i=0;i<data.schoolTeacher.length;i++) {
			            	var html = $(ohtml);
			            	html.children('.book-type').text("管理员版：");
			            	html.children('a').attr('href',"${aier_url}${aier_uri}userhscb_userSchHSConBook${aier_suffix}?sid="+ data.schoolTeacher[i].sid+"&sname="+ data.schoolTeacher[i].name_school)
			            		.text("家校联系簿("+ data.schoolTeacher[i].name_school+")");
			            	$("#booklist").append(html);
			            }
			        }
			        if (data.classList != null && data.classList.length > 0) {
			            for (var i=0;i<data.classList.length;i++) {
			            	var html = $(ohtml);
			            	html.children('.book-type').text("教师版：");
			            	html.children('a').attr('href',"${aier_url}${aier_uri}userhscb_userTeaHSConBook${aier_suffix}?cid="+data.classList[i].cid+"&cname="+data.classList[i].cname+"&tid="+data.classList[i].tid)
			            		.text("家校联系簿("+data.classList[i].cname+")");
			            	$("#booklist").append(html);
			            }
			        }
			        if (data.babyList != null && data.babyList.length > 0) {
			            for (var i=0;i<data.babyList.length;i++) {
			            	var html = $(ohtml);
			            	html.children('.book-type').text("家长版：");
			            	html.children('a').attr('href',"${aier_url}${aier_uri}userhscb_userChiHSConBook${aier_suffix}?buid="+data.babyList[i].uid+"&bname="+data.babyList[i].nickname+"&cid="+data.babyList[i].baby_classId)
			            		.text("家校联系簿("+data.babyList[i].nickname+")");
			            	$("#booklist").append(html);
			            }
			        }
               }
           };
           exeAjax(
                ajaxUrl("${aier_url}${aier_urijs}userhscb_searchAllBook${aier_suffix}"),
                fun,{
           });
    });
    
    
    
</script>
</body>
</html>